<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>专利协同服务平台</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/H-ui.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/pantentlist/reset.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/pantentlist/body.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/pantentlist/main.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/pantentlist/pantentlist.css">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery/jquery-3.2.1.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/layer.js"></script>

<style type="text/css">
.logo2 {
	margin-left: -40px;
	margin-top: -25px;
}

.patentName {
	max-width: 100px;
	display: inline-block;
}
.dropbtn {
    background-color: #126bc9;;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropdown {
	z-index:999;
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, .1);
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color: #f1f1f1}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: #337bc8;
}

</style>
<script type="text/javascript">
	function addSynergy() {
		layer
				.open({
					content : '${pageContext.request.contextPath}/patentSynergy/patentSynergy.action',
					type : 2,
					area : [ '1000px', '700px' ]
				});
	}
	function openWindow(patentId) {
		layer
				.open({
					content : "${pageContext.request.contextPath}/poster/topostlist.action?patentId="
							+ patentId,
					type : 2,
					area : [ '1200px', '600px' ]
				});
	}
	function openChat(patentId,patentName){
		layer
		.open({
			title:patentName+'---在线聊天室',
			content : "${pageContext.request.contextPath}/chater/toChatListView.action?patentId="
					+ patentId,
			type : 2,
			area : [ '1200px', '600px' ]
		});
	}
	function openInformation(scienceId) {
		layer
				.open({
					content : "${pageContext.request.contextPath}/patent/scienceExpertInformation.html?scienceId="
							+ scienceId,
					type : 2,
					area : [ '1200px', '600px' ]
				});
	}
	function getSynergy(uri, width, height) {
		layer.open({
			content : uri,
			type : 2,
			area : [ width + 'px', height + 'px' ]
		});

	}
</script>
</head>
<body>
	<div class="user" style="position:absolute;top:15px;right:20px;padding:14px">
			<div class="dropdown">
			  <button class="dropbtn">${sessionScope.user.userName}</button>
			  <div class="dropdown-content">
			    <a href="${pageContext.request.contextPath}/researcher/toupdate.html">修改密码</a>
			    <a href="${pageContext.request.contextPath}/admin/loginUI.html">退出</a>
			  </div>
			</div>
			
	</div>

	<div id="contain" class="c_contain">
		<div id="top" class="c_top" style="
    background: #015AB8;
height:110px;padding:0px">
    <!-- 标题文字 --><div style="z-index:999;color:white;width:100%;text-align:center;background: url('/images/index_logo2.png') no-repeat;height:110px;line-height:110px">专利协同服务平台</div>
			
		</div>
		<div id="center" class="c_center">
			<div class="bd">
				<div class="main_body">
					<div class="tab_2_list">
						<ul>
							<li class="tab_first on">
								<div class="tab_top_on">
									<p>&nbsp;&nbsp;&nbsp;专利列表&nbsp;&nbsp;&nbsp;</p>
								</div>
							</li>

						</ul>
					</div>
					<div class="main_box">
						<form id="queryForm"
							action="${pageContext.request.contextPath}/patent/topatentlist.action"
							method="post">
							<div class="tips_box" style="width: 90%;">
								<span id="tips"><img alt="warn"
									src="../images/warning.jpg">
									&nbsp;&nbsp;提示：本系统采用精确查询,查询条件必须填至少一个 &nbsp;&nbsp;&nbsp;&nbsp;</span> <a
									onclick="addSynergy()" class="btn btn-primary radius"
									style="width: 200px;">新建专利协同申请</a>

							</div>
							<div class="check_box public-search" style="width: 90%;">
								<table style="width: 100%; margin-top: 20px;" class="table_box">
									<tbody>
										<tr>
											<c:forEach items="${dicPatentStates}" var="dicPatentState">
												<div class="radio-box" style="margin-top: 15px;">
													<input type="radio" id="-1" name="patentState"
														value="${dicPatentState.typeCode}"> <label
														for="sex-1">${dicPatentState.description}专利</label>
												</div>
											</c:forEach>
											<div class="radio-box" style="margin-top: 15px;">
												<input type="radio" id="-1" name="patentState" value="0">
												<label for="sex-1">全部专利</label>
											</div>

										</tr>
										<tr style="border-top: 1px solid #CBC9C9;">
											<td style="width: 80px;">专利名称：</td>
											<td align="left"><input name="name" value="${name}"
												class="Wdate" 
												style="padding-left: 10px; font-size: 18px; height: 30px; margin-left: 15px; display: block;"
												type="text" /></td>
											<td colspan="4" style="text-align: left; padding-left: 5px;">
												<input class="btn btn-primary" type="submit"
												value="&nbsp;&nbsp;查询&nbsp;&nbsp;" /> <input
												class="btn btn-primary" type="reset"
												value="&nbsp;&nbsp;重置&nbsp;&nbsp;" />
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</form>

						<div class="select_box es_box ru_box de_box" style="width: 90%;">
							<div class="">
								<table style="width: 100%" cellspacing="0" cellpadding="0"
									border="0">
									<tbody>
										<tr>
											<td width="11%" style="color: #8BA2AE;">专利名称</td>
											<td width="11%" style="color: #8BA2AE;">所属学科</td>
											<td width="12%" style="color: #8BA2AE;">专利协同申请书</td>
											<td width="11%" style="color: #8BA2AE;">专利交底书</td>
											<td width="11%" style="color: #8BA2AE;">科技服务人员</td>
											<td width="11%" style="color: #8BA2AE;">专利状态</td>
											<td width="11%" style="color: #8BA2AE;">提交时间</td>
											<td width="11%" style="color: #8BA2AE;">沟通服务</td>
											<td width="11%" style="color: #8BA2AE;">沟通次数</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div
							style="padding-left: 100px; padding-top: 10px; font-size: 20px; color: red;">
							${errorNullMsg}</div>
						<c:forEach items="${patents}" var="patent" varStatus="status">
							<div class="content_listx" style="width: 90%;">
								<div class="content_boxx">
									<table class="content_listx_patent" width="100%"
										cellspacing="0" cellpadding="0" border="1">
										<tbody>
											<tr style="display: block;">
												<td width="11%"><span> <span name="record:zlmc"
														class="patentName" title="专利名称">${patent.name}</span>
												</span></td>
												<c:forEach items="${patentSubjectsChars}"
													var="subjectsChars">
													<c:if test="${subjectsChars.key == patent.id}">
														<td width="11%"><span> <span
																name="record:ssxk" title="所属学科">${subjectsChars.value}</span>
														</span></td>
													</c:if>
												</c:forEach>
												<c:choose>
													<c:when test="${patent.sfSynergy == 1}">
														<td width="12%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
															onclick="getSynergy('${pageContext.request.contextPath}/patentSynergy/patentSynergy.action?patentId=${patent.id}',1200,700)"
															target="_blank"
															style="color: white; text-decoration: none;"
															class="btn btn-success radius">专利协同申请书</a>
														</td>
													</c:when>
													<c:when test="${patent.sfSynergy == 0}">
														<td width="13%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
															onclick="addSynergy()" target="_blank"
															style="color: white; text-decoration: none;"
															class="btn btn-default radius">专利协同申请书</a>
														</td>
													</c:when>
												</c:choose>
												<c:choose>
													<c:when test="${patent.sfApply == 1}">
														<td width="11%">&nbsp;&nbsp;&nbsp;&nbsp; <a
															onclick="getSynergy('${pageContext.request.contextPath}/patentApply/patentApply.action?patentId=${patent.id}',1400,800)"
															target="_blank"
															style="color: white; text-decoration: none;"
															class="btn btn-success radius">专利交底书</a>
														</td>
													</c:when>
													<c:when test="${patent.sfApply == 0}">
														<td width="11%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
															target="_blank"
															onclick="getSynergy('${pageContext.request.contextPath}/patentApply/patentApply.action?patentId=${patent.id}',1400,800)"
															style="color: white; text-decoration: none;"
															class="btn btn-default radius">专利交底书</a>
														</td>
													</c:when>
												</c:choose>
												<td width="11%">&nbsp;&nbsp; <c:choose>
														<c:when test="${!empty patent.scienceExpert.userName}">
															<span name="record:jdry" style="cursor:pointer;" title="接单人员" onclick="openInformation('${patent.scienceExpert.id}')">${patent.scienceExpert.userName}</span>
														</c:when>
														<c:when test="${empty patent.scienceExpert.userName}">
															<span name="record:jdry" title="接单人员">--------</span>
														</c:when>
													</c:choose>
												</td>
												<td width="11%"><c:forEach items="${dicPatentStates}"
														var="dicPatentState">
														<c:if
															test="${dicPatentState.typeCode == patent.patentState}">&nbsp;&nbsp;&nbsp;&nbsp;
													<span name="record:zlzt" title="专利状态">${dicPatentState.description}
																<c:if test="${dicPatentState.typeCode == 1002}">
																	<br>
																	<c:if test="${!empty patent.finishReportFileName}">
																		<button onclick="report('${patent.id}')"class="btn btn-primary">查看结项报告</button>
																	</c:if>
																</c:if>
															</span>
														</c:if>
													</c:forEach></td>
													<td width="11%"><span> <span name="record:zlmc"
														class="patentName" title="提交时间"><fmt:formatDate value="${patent.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></span>
													</span></td>
												<td width="12%">
													&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
													href="javascript:openWindow('${patent.id}')"
													style="color: #5A98DE; text-decoration: none;    display: inline-block;
    width: 100px">[留言沟通]</a><br><a
													href="javascript:openChat('${patent.id}','${patent.name }')"
													style="color: #5A98DE; text-decoration: none;">[在线交流]</a>
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2921225730&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:2921225730:41" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>													
												</td>
												<td width="11%"><span> <span name="record:zlmc"
														class="patentName" title="提交时间">${patent.communicationNum}</span>
												</span></td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</c:forEach>

					</div>
					<!-- main_box -->
				</div>
			</div>
		</div>
		<!-- center-->
		<div id="floor" class="c_floor"></div>
		<!-- floor-->
	</div>
<script>
	function report(id)
	{layer.open({
		content : "${pageContext.request.contextPath}/scienceExpert/finishReport.do?patentId="+id,
		type : 2,
		area : [ '800px', '600px' ]
	});

	}
</script>
</body>
</html>